#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include "logo.h"

char wordName[MAXVALUE][MAXLONG] = {"\0"};
char wordValue[MAXVALUE][MAXLONG] = {"\0"};
int wordLen = 0;


int main(int argc, char *argv[])
{
  
  while ( 1 )
  {
        getCmd();
  }
  
  system("PAUSE");	
  return 0;
}
/*



char *getWord(void)
{
  char *word = 0;
  int strLen = 0;
  char c = 0;
  char string[100] = "\0";
  
//  printf("welcome to getword\n");
    
  while (((c = getchar())!= '+') 
        && (c != '-') && (c != '*') && (c != '/') && (c != '(') && (c != ')'))
  {
//    printf("the present char is :%c\n", c);
        
    if (isspace(c))
    {
//      printf("isspace string is %s\n", string);
//      printf("strcmp is %d\n",strcmp(string, "THING"));
      if (!strcmp(string, "THING") || (c == ':'))
      {
//        printf("Really?\n");
	    strcpy(word, findWord(getWord()));
	  }
      else
      {
          ;
	  }
      word = string;
      goto RE;	  
	}
    if (c != '\"')
    {
       string[strLen++] = c;
	   string[strLen] = 0;
    }    
  }
  RE:
//    printf("getWord is %s\n", word);
    return word;
}

char *findWord(const char *word)
{
  int i;
  char s[100] = "\0";
  char *answer = s;
 
//  printf("welcome to findword:%s\n", word);
  
  if (!word)
  {
//    printf("Please check out the word you input\n");
    goto RE;
  };

//  printf("welcome to findword:%s\n", word);
  
  for (i = 0; i < wordLen; i++)
  {
//    printf("wordName[%d] is %s.\n", i, wordName[i]);
//    printf("wordValue[%d] is %s.\n", i, wordValue[i]);
    if (strcmp(wordName[i], word) == 0)
    {
//      printf("i-----%d\n", i);
      strcpy(answer, wordValue[i]);
      goto RE;	  
    }
  }
 
  RE:
//    printf("answer of findWord:%s.\n", answer);
    return answer;
}

void make(const char *word, const char *value)
{
  int i;
  
//  printf("welcome to make!\n");
  
  for (i = 0; i < wordLen; i++)
  { 
    if (strcmp(wordName[i], word) == 0)
	{
	  strcpy(wordValue[i], value);
	  goto RE;
	}
  }
  
//  printf("welcome to make!\n");
//  printf("welcome to make!------%s------%s------\n", word, value);
  
  strcpy(wordName[wordLen], word);
  strcpy(wordValue[wordLen], value);
//  printf("wordName[%d] is %s.\n", wordLen, wordName[wordLen]);
//  printf("wordValue[%d] is %s.\n", wordLen, wordValue[wordLen]);
  wordLen++;

  goto RE;
  
  RE:
      ;
}
*/
